package edu.sctu.practice.class01.nieyu.assign03.assign03_2;

/**
 * Created by Administrator on 2015/10/22.
 */
public class Client {

    public static void main(String[] args) {

        ComparableCircle cc1 = new ComparableCircle(1.5);
        ComparableCircle cc2 = new ComparableCircle(2);
        Comparable circle = Max.max(cc1,cc2);
        System.out.println("最大圆的半径为： " + ((Circle)circle).getRadius());
        System.out.println(circle);

        ComparableCylinder ccy1 = new ComparableCylinder(5);
        ComparableCylinder ccy2 = new ComparableCylinder(3);
        Comparable cylinder = Max.max(ccy1,ccy2);
        System.out.println("最大圆柱： " +"\n\t"+"半径："+ ((Cylinder)cylinder).getRadius() + "\n\t高为： " +
                ((Cylinder)cylinder).getLength() + "\n\t体积为： " + ((Cylinder)cylinder).findVolume());
        System.out.println(cylinder);

    }
}
